<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/login.css') }}">
</head>
<body>
    <div class="login-container">
        <h2>登录</h2>
        {% if error %}
            <p class="error">{{ error }}</p>
        {% endif %}
        <form name="loginForm" action="/login" method="post" onsubmit="return validateForm()">
            <div class="form-group">
                <input type="text" id="username" name="username" required placeholder=" ">
                <label for="username">用户名</label>
            </div>
            <div class="form-group">
                <input type="password" id="password" name="password" required placeholder=" ">
                <label for="password">密码</label>
            </div>
            <button type="submit">登录</button>
        </form>
        <p>没有账户？<a href="register">点击这里注册</a></p>
    </div>
    <script src="{{ url_for('static', filename='js/login.js') }}"></script>
</body>
</html>
